<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景图片</title>
    <style>
        .div1 {
            width: 300px;
            height: 300px;
            background-image: url(img/背景图.png);
            /* 不要落下url */
            background-repeat: no-repeat;
            /* 背景图不平铺 */
            
        }
        .div2 {
            width: 300px;
            height: 300px;
            background-image: url(img/背景图.png);
            /* 不要落下url */
            /* 默认情况下背景图平铺 */
            background-repeat: repeat;
        }
        .div3 {
            width: 300px;
            height: 300px;
            background-image: url(img/背景图.png);
            /* 不要落下url */
            /* 沿x轴平铺 */
            background-repeat: repeat-x;
        }
        .div4 {
            width: 300px;
            height: 300px;
            background-image: url(img/背景图.png);
            /* 不要落下url */
            /* 沿y轴平铺 */
            background-repeat: repeat-y;
        }
    </style>
</head>
<body>
    背景图不平铺<div class="div1"></div>
    背景图平铺<div class="div2"></div>
    沿x轴平铺 <div class="div3"></div>
    沿y轴平铺 <div class="div4"></div>
    <img src="img/背景图片实现方式.png" alt="">
</body>
</html>